From 0c25fb761f5d3b9d6682ec3a5604b90ede95bbbb Mon Sep 17 00:00:00 2001 From: Simon McVittie Date: Fri, 8 May 2020 21:26:01 +0100 Subject: [PATCH] Try to split out flaky and non-flaky tests Both sets are marked as flaky for now, but hopefully the less-flaky set can be promoted to non-flaky to catch regressions when GTK 4 gets more stable. --- debian/tests/control | 6 +++++- debian/tests/installed-tests | 9 ++++++++- debian/tests/installed-tests-flaky | 29 +++++++++++++++++++++++++++++ 3 files changed, 42 insertions(+), 2 deletions(-) create mode 100755 debian/tests/installed-tests-flaky diff --git a/debian/tests/control b/debian/tests/control index 85bb35939b..737922d034 100644 --- a/debian/tests/control +++ b/debian/tests/control @@ -4,9 +4,13 @@ Restrictions: allow-stderr, superficial Tests: python3-gi Depends: dbus, gir1.2-gtk-4.0, python3-gi, xauth, xvfb -# https://gitlab.gnome.org/GNOME/pygobject/merge_requests/81/diffs +# https://gitlab.gnome.org/GNOME/pygobject/-/merge_requests/81, !145, etc. Restrictions: flaky, superficial Tests: installed-tests Depends: at-spi2-core, dbus (>= 1.8), gnome-desktop-testing (>= 2018.1-1~), gtk-4-examples, locales | locales-all, librsvg2-common, xauth, xvfb Restrictions: allow-stderr, flaky + +Tests: installed-tests-flaky +Depends: at-spi2-core, dbus (>= 1.8), gnome-desktop-testing (>= 2018.1-1~), gtk-4-examples, locales | locales-all, librsvg2-common, xauth, xvfb +Restrictions: allow-stderr, flaky diff --git a/debian/tests/installed-tests b/debian/tests/installed-tests index 83b57ea25e..ab00178d01 100755 --- a/debian/tests/installed-tests +++ b/debian/tests/installed-tests @@ -11,6 +11,13 @@ export GIO_USE_VOLUME_MONITOR=unix export XDG_RUNTIME_DIR="$AUTOPKGTEST_TMP" +tests=$(gnome-desktop-testing-runner -l gtk-4.0 | + cut -f1 -d' ' | + grep -v '^gtk-4.0/a11y/tree.test$' | + grep -v '^gtk-4.0/a11y/tree.test$' | + grep -v '^gtk-4.0/gtk/displayclose.test$' | + grep -v '^gtk-4.0/gtk/icontheme.test$') + exec dbus-run-session -- \ xvfb-run -a -s "-screen 0 1024x768x24" \ debian/run-with-locales \ @@ -22,4 +29,4 @@ debian/run-with-locales \ gnome-desktop-testing-runner \ --report-directory="$AUTOPKGTEST_ARTIFACTS" \ --tap \ -gtk-4.0 +$tests diff --git a/debian/tests/installed-tests-flaky b/debian/tests/installed-tests-flaky new file mode 100755 index 0000000000..0379cdfeb9 --- /dev/null +++ b/debian/tests/installed-tests-flaky @@ -0,0 +1,29 @@ +#!/bin/sh +# autopkgtest check: Run the installed-tests to verify GTK works correctly +# Based on glib2.0's d/tests/installed-tests, (C) 2013 Canonical Ltd. + +set -e + +# Disable gvfs if it happens to be installed. We want to test the built-in +# stuff +export GIO_USE_VFS=local +export GIO_USE_VOLUME_MONITOR=unix + +export XDG_RUNTIME_DIR="$AUTOPKGTEST_TMP" + +exec dbus-run-session -- \ +xvfb-run -a -s "-screen 0 1024x768x24" \ +debian/run-with-locales \ + --generate de_DE.UTF-8 \ + --generate en_GB.UTF-8 \ + --generate en_US.UTF-8 \ + --generate sv_SE \ + -- \ +xvfb-run -a -s "-screen 0 1024x768x24" \ +gnome-desktop-testing-runner \ +--report-directory="$AUTOPKGTEST_ARTIFACTS" \ +--tap \ +gtk-4.0/a11y/tree.test \ +gtk-4.0/a11y/tests.test \ +gtk-4.0/gtk/displayclose.test \ +gtk-4.0/gtk/icontheme.test -- 2.30.2